package hhm.javamode.state;

/**
 * Created by Administrator on 2017/1/23.
 */
public class TaskContext {

    TaskState state = null;
    //新建状态设为已停止状态
    TaskContext() {
        this.state = new StopState();
    }

    void setState(TaskState state) {
        this.state = state;
    }

    public void start() {
        state.start(this);
    }

    public void stop() {
        state.stop(this);
    }


}
